package com.lyl.novel.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.lyl.novel.model.dto.TaskDTO;
import com.lyl.novel.model.dto.TaskListDTO;
import com.lyl.novel.model.entity.Task;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.Set;

/**
 * (Task)表服务接口
 *
 * @author Mr Luo
 * @since 2022-08-22 16:10:24
 */
public interface TaskService extends IService<Task> {

    boolean addJob(TaskDTO dto);

    boolean stopJob(Long id);

    boolean resumeJob(Long id);

    boolean runOnce(Long id);

    boolean delJob(Long id);

    PageInfo<Task> pageList(Integer pageNo, Integer pageSize, TaskListDTO dto);

    Set<String> getJobClassList();

    void downloadExcel(Integer pageNo, Integer pageSize) throws IOException;
}

